<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model app\modules\Product\models\ProductFlight */

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Product Flights'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="product-flight-view">

     <h2 class="page-header"><?= Html::encode($this->title) ?>
        <p class="pull-right"> 
            <?= Html::a(Yii::t('app', 'Update'), ['flight-update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
            <?= Html::a(Yii::t('app', 'Index'), ['index','product_id'=>$product->id], ['class' => 'btn btn-danger']) ?>
        </p>
    </h2>
    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            //'id',
            //'product_id',
             [
                'attribute' => 'product_id',
                'value' => $product->name,
            ],
            'name',
            'num:decimal',
            'price:decimal',
            'remark',
             [
                'attribute' => 'status',
                'value' => Yii::$app->params['status'][$model->status],
            ],
            //'user_id',
            'created_at:datetime',
            'updated_at:relativeTime',
        ],
    ]) ?>

</div>
